#pragma once

#include <QWidget>
#include <QtWidgets/QMessageBox>
#include <QtDataVisualization/Q3DSurface>
#include <QtDataVisualization/QSurfaceDataProxy>
#include <QtDataVisualization/QSurface3DSeries>
namespace Ui { class My3DSurface; };
using namespace QtDataVisualization;

class My3DSurface : public QWidget
{
	Q_OBJECT

public:
	My3DSurface(QWidget *parent = Q_NULLPTR);
	~My3DSurface();
	void create3DView();
	void xChange(QValue3DAxis *axis);

public slots:
	void on_btnCreate3DView_clicked();
	void on_btnFlipHorizontalGrid_clicked();

	void on_Surface_clicked(); 
	void on_gridLayout_clicked();
	void on_my3DWidget_clicked();

	void on_btnGradientColor_clicked();
	void on_btnUniformColor_clicked();
	
private:
	Q3DSurface *surface;
	QWidget	*my3DWidget;
	QSurfaceDataArray *data;
	QSurfaceDataRow *dataRow1;
	QSurfaceDataRow *dataRow2;
	QSurfaceDataRow *dataRow3;
	QSurface3DSeries *series;

	QValue3DAxis *axisX;
	QValue3DAxis *axisY;
	QValue3DAxis *axisZ;
	
	Ui::My3DSurface *ui;
};
